
import 'package:baby/Entities/Record/TextRecord.dart';
import 'package:flutter/material.dart';

import 'RecordView.dart';

class RecordList extends StatefulWidget {
  final List<TextRecord> records;

  RecordList({@required this.records}) : assert(records != null);

  @override
  State<StatefulWidget> createState() => _RecordListState();
}

class _RecordListState extends State<RecordList> {
  var textStyle = TextStyle(color: Colors.white);
  var scrollController = ScrollController();

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
        children: widget.records.map((record) => RecordViewer(record: record,)).toList()
    );
  }
}